package cn.tedu.controller;

import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("car")
public class TestController {
    // 测试restful写法， http://localhost:8080/car/get2/100/张三
    @RequestMapping("get2/{id}/{name}")
    public String getParam(@PathVariable Integer id,
                           @PathVariable String name) {
        return "返回的结果是" + id + name;
    }
}
